/**
 * Created by Administrator on 2016/12/23 0023.
 */
//引包
var mongoose = require("mongoose");
//创建数据库连接
var db = mongoose.createConnection("mongodb://localhost:27017/tushu");
//监听open事件
db.once("open", function (callback) {
    console.log("数据库连接成功");
});
//向外暴露
module.exports = db;